import Mock from 'mockjs'
import data from './data.json'

Mock.mock('/goods',{code:0,data:data.goods})

Mock.mock('/info',{code:0,data:data.info})

Mock.mock('/ratings',{code:0,data:data.ratings})

Mock.mock('/recommend',{code:0,data:data.recommend})

Mock.mock('/goods/pop1',{code:0,data:data.goods})

Mock.mock('/goods/new',{code:0,data:data.goods})

Mock.mock('/goods/sell',{code:0,data:data.goods})

for (let i = 1; i<5;i++) {
  Mock.mock(`/detail?id=${i}`,{data:data.detail[i-1]})
}
//Mock.mock('/detail?id=aaa',{code:0,data:data.detail[0]})
